Optimal. Leaf size=60 \[ \frac{a \tan ^3(c+d x)}{3 d}-\frac{a \tan (c+d x)}{d}+\frac{a \sec ^3(c+d x)}{3 d}-\frac{a \sec (c+d x)}{d}+a x \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0978578, antiderivative size = 60, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 4, integrand size = 25, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.16, Rules used = {2838, 2606, 3473, 8} \[ \frac{a \tan ^3(c+d x)}{3 d}-\frac{a \tan (c+d x)}{d}+\frac{a \sec ^3(c+d x)}{3 d}-\frac{a \sec (c+d x)}{d}+a x \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2838
Rule 2606
Rule 3473
Rule 8
Rubi steps
\begin{align*} \int \sec (c+d x) (a+a \sin (c+d x)) \tan ^3(c+d x) \, dx &=a \int \sec (c+d x) \tan ^3(c+d x) \, dx+a \int \tan ^4(c+d x) \, dx\\ &=\frac{a \tan ^3(c+d x)}{3 d}-a \int \tan ^2(c+d x) \, dx+\frac{a \operatorname{Subst}\left (\int \left (-1+x^2\right ) \, dx,x,\sec (c+d x)\right )}{d}\\ &=-\frac{a \sec (c+d x)}{d}+\frac{a \sec ^3(c+d x)}{3 d}-\frac{a \tan (c+d x)}{d}+\frac{a \tan ^3(c+d x)}{3 d}+a \int 1 \, dx\\ &=a x-\frac{a \sec (c+d x)}{d}+\frac{a \sec ^3(c+d x)}{3 d}-\frac{a \tan (c+d x)}{d}+\frac{a \tan ^3(c+d x)}{3 d}\\ \end{align*}
Mathematica [A] time = 0.041551, size = 69, normalized size = 1.15 \[ \frac{a \tan ^3(c+d x)}{3 d}+\frac{a \tan ^{-1}(\tan (c+d x))}{d}-\frac{a \tan (c+d x)}{d}+\frac{a \sec ^3(c+d x)}{3 d}-\frac{a \sec (c+d x)}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.064, size = 88, normalized size = 1.5 \begin{align*}{\frac{1}{d} \left ( a \left ({\frac{ \left ( \tan \left ( dx+c \right ) \right ) ^{3}}{3}}-\tan \left ( dx+c \right ) +dx+c \right ) +a \left ({\frac{ \left ( \sin \left ( dx+c \right ) \right ) ^{4}}{3\, \left ( \cos \left ( dx+c \right ) \right ) ^{3}}}-{\frac{ \left ( \sin \left ( dx+c \right ) \right ) ^{4}}{3\,\cos \left ( dx+c \right ) }}-{\frac{ \left ( 2+ \left ( \sin \left ( dx+c \right ) \right ) ^{2} \right ) \cos \left ( dx+c \right ) }{3}} \right ) \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.53314, size = 74, normalized size = 1.23 \begin{align*} \frac{{\left (\tan \left (d x + c\right )^{3} + 3 \, d x + 3 \, c - 3 \, \tan \left (d x + c\right )\right )} a - \frac{{\left (3 \, \cos \left (d x + c\right )^{2} - 1\right )} a}{\cos \left (d x + c\right )^{3}}}{3 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.42534, size = 196, normalized size = 3.27 \begin{align*} -\frac{3 \, a d x \cos \left (d x + c\right ) - 4 \, a \cos \left (d x + c\right )^{2} -{\left (3 \, a d x \cos \left (d x + c\right ) + a\right )} \sin \left (d x + c\right ) + 2 \, a}{3 \,{\left (d \cos \left (d x + c\right ) \sin \left (d x + c\right ) - d \cos \left (d x + c\right )\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.23333, size = 100, normalized size = 1.67 \begin{align*} \frac{6 \,{\left (d x + c\right )} a + \frac{3 \, a}{\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 1} + \frac{9 \, a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} - 24 \, a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 11 \, a}{{\left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - 1\right )}^{3}}}{6 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]